import request from '@/utils/request'

// 查询Inventory列表
export function listInventory(query) {
  return request({
    url: '/business/Inventory/list',
    method: 'get',
    params: query
  })
}

export function  saveCar(data) {
  return request({
    url: '/business/carmain/edit',
    method: 'post',
    data: data
  })
}

// 查询Inventory详细
export function getInventory(cinvcode) {
  return request({
    url: '/business/Inventory/' + cinvcode,
    method: 'get'
  })
}



// 新增Inventory
export function addInventory(data) {
  return request({
    url: '/business/Inventory',
    method: 'post',
    data: data
  })
}

// 修改Inventory
export function updateInventory(data) {
  return request({
    url: '/business/Inventory',
    method: 'put',
    data: data
  })
}

// 删除Inventory
export function delInventory(cinvcode) {
  return request({
    url: '/business/Inventory/' + cinvcode,
    method: 'delete'
  })
}

// 导出Inventory
export function exportInventory(query) {
  return request({
    url: '/business/Inventory/export',
    method: 'get',
    params: query
  })
}

// 查询存货分类树
export function treeselect() {
  return request({
    url: '/business/Inventory/treeselect',
    method: 'get'
  })
}
